/**
 * 
 */
package library;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Gedsimon Pereira - 58554
 * @contact gspas@iscte.pt
 * 
 */
public class ContainsWord implements Filter {

	private List<String> lstString;

	public ContainsWord(String... string) {
		lstString = new ArrayList<String>();
		for (String str : string) {
			lstString.add(str);
		}
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see library.Filter#accept(java.lang.String)
	 */
	@Override
	public boolean accept(String filters) {
		if (!filters.isEmpty()) {
			for (String str : lstString) {
				if (filters.startsWith(str)) {
					return true;
				}
			}
		}
		return false;
	}

	public List<String> getLstString() {
		return lstString;
	}

	public void setLstString(List<String> lstString) {
		this.lstString = lstString;
	}

}
